<?php
/**
 * ===============================================
 * 版权所有 2019-2050 青岛铁锤科技有限公司，并保留所有权利。
 * 网站地址: http://www.huaxianling.com
 * ===============================================
 * Author: Rag Hu
 * Created Time: 2019/7/1 9:38
 * Modified Time: 2019/7/1 9:38
 * Version: 2.0
 */

namespace App\Models;


use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class CardType extends Model
{
    use SoftDeletes;
    protected $table = "card_type";

    protected $guarded = [];

    //获取卡类下的会员卡
    public function memberCard(){
        return $this->hasMany(MemberCard::class,'type_id','id');
    }

    //获取关联服务
    public function cardTypeService(){
        return $this->hasMany(CardTypeService::class,'type_id','id');
    }
}